import Cookies from 'js-cookie'

export function getUser() {
  
   var user = window.localStorage.getItem('User');
    return user?JSON.parse(user):user;
}
export function setUser(user) {
  
  return window.localStorage.setItem('User', JSON.stringify(user),{ expires: 1 })
}
export function setSchool(school) {
  
  return Cookies.set("School",school)
}
export function getSchool() {
  
  
  var school  = Cookies.get('School');
  
   return school;
}
export function removeUser(){
  window.localStorage.removeItem("User");
}
